<%--
  Created by IntelliJ IDEA.
  User: ZTencent
  Date: 2022/12/29
  Time: 17:59
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fm" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link href="${pageContext.request.contextPath}/statics/assets/css/bootstrap.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/statics/css/style.css"/>
    <link href="${pageContext.request.contextPath}/statics/assets/css/codemirror.css" rel="stylesheet">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/statics/assets/css/ace.min.css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/statics/font/css/font-awesome.min.css" />
    <!--[if lte IE 8]>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/statics/assets/css/ace-ie.min.css" />
    <![endif]-->
    <script src="${pageContext.request.contextPath}/statics/js/jquery-1.9.1.min.js"></script>
    <script src="${pageContext.request.contextPath}/statics/assets/js/bootstrap.min.js"></script>
    <script src="${pageContext.request.contextPath}/statics/assets/js/typeahead-bs2.min.js"></script>
    <script src="${pageContext.request.contextPath}/statics/assets/js/jquery.dataTables.min.js"></script>
    <script src="${pageContext.request.contextPath}/statics/assets/js/jquery.dataTables.bootstrap.js"></script>
    <script src="${pageContext.request.contextPath}/statics/assets/layer/layer.js" type="text/javascript" ></script>
    <script src="${pageContext.request.contextPath}/statics/assets/laydate/laydate.js" type="text/javascript"></script>
    <script src="${pageContext.request.contextPath}/statics/js/lrtk.js" type="text/javascript" ></script>
    <title>订单处理</title>
</head>

<body>
<div class="clearfix">

    <div class="order_list_style" id="order_list_style" style="margin-left: 20px;">
        <div class="search_style" style="margin: 10px 0px;">
            <form action="${pageContext.request.contextPath}/business/coupon/query?pageindex=1" method="get">
            <ul class="search_content clearfix">
                <li><label class="l_f">优惠卷查询</label><input name="name" type="text"  class="text_add" placeholder="输入优惠卷名称"  style=" width:250px"/></li>
                <li style="width:90px;"><button type="button" class="btn_search"><i class="fa fa-search"></i>查询</button></li>
                <li><a  href="${pageContext.request.contextPath}/business/coupon/add" title="优惠卷添加"  class="btn btn-xs btn-success">优惠卷添加</a></li>
            </ul>
            </form>
        </div>
        <!--交易订单列表-->
        <div class="Orderform_list">
            <table class="table table-striped table-bordered table-hover" id="sample-table">
                <thead>
                <tr>
                    <th width="25px"><label><input type="checkbox" class="ace"><span class="lbl"></span></label></th>
                    <th width="120px">优惠卷名称</th>
                    <th width="250px">是否满减</th>
                    <th width="100px">满减金额</th>
                    <th width="100px">减免金额</th>
                    <th width="100px">是否折扣</th>
                    <th width="100px">折扣</th>
                    <th width="100px">状态</th>
                    <th width="250px">操作</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach var="c" items="${pageinfo.list}">
                <tr>
                    <td><label><input type="checkbox" class="ace"><span class="lbl"></span></label></td>
                    <td>${c.couponName}</td>
                    <td class="order_product_name">
                       ${c.isFullDecrement?"是":"否"}
                    </td>
                    <td>${c.fullPrice}</td>

                    <td>${c.reductionPrice}</td>
                    <td>
                            ${c.isdiscount?"是":"否"}
                    </td>
                    <td class="tb-status">
                            ${c.discount}
                    </td>
                    <td class="tb-status">
                        <c:choose>
                            <c:when test="${c.status==0}">
                            <span class="label label-warning radius">已禁用</span>
                            </c:when>
                            <c:when test="${c.status==1}">
                            <span class="label label-success radius">已启用</span>
                            </c:when>
                        </c:choose>
                    </td>
                    <td>
                        <a title="修改状态" href="${pageContext.request.contextPath}/business/coupon/update?id=${c.couponId}"  class="btn btn-xs btn-success" ><i class="fa fa-cubes bigger-120"></i></a>
                        <a title="删除" href="${pageContext.request.contextPath}/business/coupon/del?id=${c.couponId}"   class="btn btn-xs btn-warning" ><i class="fa fa-trash  bigger-120"></i></a>
                    </td>
                </tr>
                </c:forEach>
                
                </tbody>
            </table>
        </div>
    </div>
</div>
</div>
</body>
<script>
    function through_save(id) {
        $.getJSON("${pageContext.request.contextPath}/business/gotoactive",{"bid":id,"bactive":0},function (e) {
            if(e.code==0){
                layer.msg(e.message);
                location.href="${pageContext.request.contextPath}/business/active?pageindex=1";
            }
        })
    }
</script>
</html>


